package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.entity.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
/**
 *菜品持久层接口
 * @author msi
 * @date 2022/5/17
 * @version 1.0
 */
@Mapper
public interface DishMapper extends BaseMapper<Dish> {
    /**
     * 修改菜品销量
     * @param dish 菜品销量
     */
    @Update("update reggie.dish set sale_num = #{saleNum} where id = #{id}")
    void updateByDishId(Dish dish);
}
